package com.example.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.example.entity.AreaTime.KeyValueBO;
import com.example.entity.Department;
import com.example.entity.department.DepartmentOneBO;
import com.example.entity.department.DepartmentTreeBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author ChenXiaoBin
 * on 2019-07-04
 */
public interface IDepartmentDao extends BaseMapper<Department> {
    /**
     * 递归查询获取部门树
     * @param parentId 父级ID
     * @return
     */
    List<DepartmentTreeBO> getDepartment(@Param("parentId") Integer parentId);

    /**
     * 近七天曲线图
     * @param map
     */
    List<KeyValueBO> getValue(Map map);


    /**
     * 查询所有部门
     * @return
     */
    List<Department> departmentList();

    /**
     * 根据年月查询
     * @param date
     * @return
     */
    List<Department> getDepartmentByDate(@Param("date") String date);

    DepartmentOneBO getCreateTime();
}
